import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;


public class makeBackground implements Runnable{

	private BufferedImage img;
	private boolean running;
	private Graphics display;
	BufferedImage temp1;
	Point p;
	public makeBackground(Graphics display, BufferedImage img,Point p)
	{
		this.img = img;
		running = true;
		this.display = display;
		temp1 = new BufferedImage(img.getWidth(),img.getHeight(),img.getType());
		this.p = p;
	}
	public void reset(Graphics display, BufferedImage img,Point p)
	{ 
		this.img = img;
		running = true;
		this.display = display;
		temp1 = new BufferedImage(img.getWidth(),img.getHeight(),img.getType());
		this.p = p;
	}
	
	public void run()
	{
		display.drawImage(img, (int)p.getX(), (int)p.getY(), null);
	}
	public BufferedImage getBackground()
	{
		return temp1;
	}
}
